package com.tjzx.entity;

/**
 * ExamHistoryInfoId entity. @author MyEclipse Persistence Tools
 */

public class ExamHistoryInfoId implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer examHistoryId;
	private Integer examId;
	private Integer qusetionId;
	private String questionRightAnswer;
	private String userAnswer;
	private Double userScore;

	// Constructors

	/** default constructor */
	public ExamHistoryInfoId() {
	}

	/** full constructor */
	public ExamHistoryInfoId(Integer id, Integer examHistoryId, Integer examId,
			Integer qusetionId, String questionRightAnswer, String userAnswer,
			Double userScore) {
		this.id = id;
		this.examHistoryId = examHistoryId;
		this.examId = examId;
		this.qusetionId = qusetionId;
		this.questionRightAnswer = questionRightAnswer;
		this.userAnswer = userAnswer;
		this.userScore = userScore;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getExamHistoryId() {
		return this.examHistoryId;
	}

	public void setExamHistoryId(Integer examHistoryId) {
		this.examHistoryId = examHistoryId;
	}

	public Integer getExamId() {
		return this.examId;
	}

	public void setExamId(Integer examId) {
		this.examId = examId;
	}

	public Integer getQusetionId() {
		return this.qusetionId;
	}

	public void setQusetionId(Integer qusetionId) {
		this.qusetionId = qusetionId;
	}

	public String getQuestionRightAnswer() {
		return this.questionRightAnswer;
	}

	public void setQuestionRightAnswer(String questionRightAnswer) {
		this.questionRightAnswer = questionRightAnswer;
	}

	public String getUserAnswer() {
		return this.userAnswer;
	}

	public void setUserAnswer(String userAnswer) {
		this.userAnswer = userAnswer;
	}

	public Double getUserScore() {
		return this.userScore;
	}

	public void setUserScore(Double userScore) {
		this.userScore = userScore;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ExamHistoryInfoId))
			return false;
		ExamHistoryInfoId castOther = (ExamHistoryInfoId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getExamHistoryId() == castOther.getExamHistoryId()) || (this
						.getExamHistoryId() != null
						&& castOther.getExamHistoryId() != null && this
						.getExamHistoryId()
						.equals(castOther.getExamHistoryId())))
				&& ((this.getExamId() == castOther.getExamId()) || (this
						.getExamId() != null
						&& castOther.getExamId() != null && this.getExamId()
						.equals(castOther.getExamId())))
				&& ((this.getQusetionId() == castOther.getQusetionId()) || (this
						.getQusetionId() != null
						&& castOther.getQusetionId() != null && this
						.getQusetionId().equals(castOther.getQusetionId())))
				&& ((this.getQuestionRightAnswer() == castOther
						.getQuestionRightAnswer()) || (this
						.getQuestionRightAnswer() != null
						&& castOther.getQuestionRightAnswer() != null && this
						.getQuestionRightAnswer().equals(
								castOther.getQuestionRightAnswer())))
				&& ((this.getUserAnswer() == castOther.getUserAnswer()) || (this
						.getUserAnswer() != null
						&& castOther.getUserAnswer() != null && this
						.getUserAnswer().equals(castOther.getUserAnswer())))
				&& ((this.getUserScore() == castOther.getUserScore()) || (this
						.getUserScore() != null
						&& castOther.getUserScore() != null && this
						.getUserScore().equals(castOther.getUserScore())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37
				* result
				+ (getExamHistoryId() == null ? 0 : this.getExamHistoryId()
						.hashCode());
		result = 37 * result
				+ (getExamId() == null ? 0 : this.getExamId().hashCode());
		result = 37
				* result
				+ (getQusetionId() == null ? 0 : this.getQusetionId()
						.hashCode());
		result = 37
				* result
				+ (getQuestionRightAnswer() == null ? 0 : this
						.getQuestionRightAnswer().hashCode());
		result = 37
				* result
				+ (getUserAnswer() == null ? 0 : this.getUserAnswer()
						.hashCode());
		result = 37 * result
				+ (getUserScore() == null ? 0 : this.getUserScore().hashCode());
		return result;
	}

}